package cloud.seat.order.repository;

//import cloud.seat.order.sg.OrderEvent;
//import lombok.RequiredArgsConstructor;
////import org.springframework.cloud.stream.function.StreamBridge;
//import org.springframework.messaging.support.MessageBuilder;
//import org.springframework.stereotype.Service;

//@Service
//@RequiredArgsConstructor
//public class OrderProducer {
////    private final StreamBridge streamBridge; // 注入动态发送工具:cite[4]
//
//    public void sendOrderEvent(OrderEvent event) {
////        // 动态选择通道 + 添加Header
////        boolean sent = streamBridge.send("orderOutput",
////                MessageBuilder.withPayload(event)
////                        .setHeader("TAG", event.getType().equals("PAY") ? "payTag" : "cancelTag")
////                        .build()
////        );
////        if (!sent) {
////            throw new RuntimeException("消息发送失败");
////        }
//    }
//}